/*
 * 需要用nodejs的兼容写法，方便生成校验清单
 * const { $demoi18n } = require('@/utils/lang')
 */
import * as Options from '@/components/common/options/options.js';
import { $demoi18n } from '@/utils/lang';

const positions = [
  { label: 'top', value: 'top' },
  { label: 'left', value: 'left' },
  { label: 'right', value: 'right' },
  { label: 'bottom', value: 'bottom' },
  { label: 'inside', value: 'inside' },
  { label: 'insideLeft', value: 'insideLeft' },
  { label: 'insideRight', value: 'insideRight' },
  { label: 'insideTop', value: 'insideTop' },
  { label: 'insideBottom', value: 'insideBottom' },
  { label: 'insideTopLeft', value: 'insideTopLeft' },
  { label: 'insideBottomLeft', value: 'insideBottomLeft' },
  { label: 'insideTopRight', value: 'insideTopRight' },
  { label: 'insideBottomRight', value: 'insideBottomRight' },
];

export const fontWeightOptions = [
  { label: 'normal', value: 'normal' },
  { label: 'bolder', value: 'bolder' },
  { label: 'bold', value: 'bold' },
  { label: 100, value: 100 },
  { label: 200, value: 200 },
  { label: 300, value: 300 },
  { label: 400, value: 400 },
  { label: 500, value: 500 },
  { label: 600, value: 600 },
  { label: 700, value: 700 },
  { label: 800, value: 800 },
];

export const { fontFamilyOptions } = Options;

export const lineTypes = [
  { label: $demoi18n('echart.option.solidLine'), value: 'solid' },
  { label: $demoi18n('echart.option.dashedLine'), value: 'dashed' },
  { label: $demoi18n('echart.option.dotsAndLines'), value: 'dotted' },
];

export const symbols = [
  { label: 'none', value: 'none' },
  { label: 'circle', value: 'circle' },
  { label: 'rect', value: 'rect' },
  { label: 'roundRect', value: 'roundRect' },
  { label: 'triangle', value: 'triangle' },
  { label: 'diamond', value: 'diamond' },
  { label: 'pin', value: 'pin' },
  { label: 'arrow', value: 'arrow' },
];

export const markLineTypes = [
  { label: 'min', value: 'min' },
  { label: 'max', value: 'max' },
  { label: 'average', value: 'average' },
  { label: 'median', value: 'median' },
];

export const markLineNamePositions = [
  { label: 'start', value: 'start' },
  { label: 'middle', value: 'middle' },
  { label: 'end', value: 'end' },
  { label: 'insideStartTop', value: 'insideStartTop' },
  { label: 'insideStartBottom', value: 'insideStartBottom' },
  { label: 'insideMiddleTop', value: 'insideMiddleTop' },
  { label: 'insideMiddleBottom', value: 'insideMiddleBottom' },
  { label: 'insideEndTop', value: 'insideEndTop' },
  { label: 'insideEndBottom', value: 'insideEndBottom' },
];

export const markAreaTypes = [
  { label: 'min', value: 'min' },
  { label: 'max', value: 'max' },
  { label: 'average', value: 'average' },
  { label: 'median', value: 'median' },
];

export const markAreaNamePositions = positions;
export const seriesLabelPositions = positions;

export const xAxisTypes = [
  { label: $demoi18n('echart.option.category'), value: 'category' },
  { label: $demoi18n('echart.option.value'), value: 'value' },
  { label: $demoi18n('echart.option.time'), value: 'time' },
];

export const yAxisTypes = [
  { label: $demoi18n('echart.option.category'), value: 'category' },
  { label: $demoi18n('echart.option.value'), value: 'value' },
  { label: $demoi18n('echart.option.time'), value: 'time' },
];

export const axisNameLocations = [
  { label: $demoi18n('echart.option.start'), value: 'start' },
  { label: $demoi18n('echart.option.middle'), value: 'middle' },
  { label: $demoi18n('echart.option.end'), value: 'end' },
];

export const xAxisPositions = [
  { label: $demoi18n('echart.option.top'), value: 'top' },
  { label: $demoi18n('echart.option.bottom'), value: 'bottom' },
];

export const yAxisPositions = [
  { label: $demoi18n('echart.option.left'), value: 'left' },
  { label: $demoi18n('echart.option.right'), value: 'right' },
];

export const dataZoomOrients = [
  { label: $demoi18n('echart.option.horizontalData'), value: 'horizontal' },
  { label: $demoi18n('echart.option.verticalData'), value: 'vertical' },
  { label: $demoi18n('echart.option.horizontalVerticalData'), value: 'horizontal_vertical' },
];

export const dataZoomZoomOnMouseWheels = [
  { label: $demoi18n('echart.option.doNotTriggerScaling'), value: false },
  { label: $demoi18n('echart.option.mouseWheelTriggersZoom'), value: true },
  { label: $demoi18n('echart.option.shiftMouseWheelTriggerZoom'), value: 'shift' },
  { label: $demoi18n('echart.option.ctrlMouseWheelToTriggerZoom'), value: 'ctrl' },
  { label: $demoi18n('echart.option.altMouseWheelTriggerZoom'), value: 'alt' },
];

export const dataZoomMoveOnMouseMoves = [
  { label: $demoi18n('echart.option.doNotTriggerWindowPan'), value: false },
  { label: $demoi18n('echart.option.mouseMovementTriggersWindowPanning'), value: true },
  { label: $demoi18n('echart.option.shiftDragTheMouseToTriggerWindowPanning'), value: 'shift' },
  { label: $demoi18n('echart.option.ctrlDragToTriggerWindowPanning'), value: 'ctrl' },
  { label: $demoi18n('echart.option.altDragTheMouseToTriggerTheWindowPanning'), value: 'alt' },
];

export const xyAxisTypes = [
  { label: $demoi18n('echart.option.xAxis'), value: 'x' },
  { label: $demoi18n('echart.option.yAxis'), value: 'y' },
];

export const legendTypes = [
  { label: $demoi18n('echart.option.commonLegend'), value: 'plain' },
  { label: $demoi18n('echart.option.scrollLegend'), value: 'scroll' },
];

export const legendOrigents = [
  { label: $demoi18n('echart.option.leveling'), value: 'horizontal' },
  { label: $demoi18n('echart.option.vertical'), value: 'vertical' },
];

export const legendAligns = [
  { label: $demoi18n('echart.option.leftAlignment'), value: 'left' },
  { label: $demoi18n('echart.option.rightAlignment'), value: 'right' },
];

export const legendDisplayType = [
  { label: $demoi18n('echart.option.displayName'), value: 'name' },
  { label: $demoi18n('echart.option.displayNameAndPercentage'), value: 'name,percentage' },
  { label: $demoi18n('echart.option.displayNameAndValueAndPercentage'), value: 'name,value,percentage' },
  { label: $demoi18n('echart.option.displayNameAndValue'), value: 'name,value' },
];
export const labelDisplayType = [
  { label: $demoi18n('echart.option.displayNameAndValue'), value: 'name,value' },
  { label: $demoi18n('echart.option.displayNameAndValueAndPercentage'), value: 'name,value,percentage' },
];

export const lineBarserieTypes = [
  { label: $demoi18n('echart.option.bar'), value: 'bar' },
  { label: $demoi18n('echart.option.line'), value: 'line' },
];

export const legendIcons = [
  { label: 'none', value: 'none' },
  { label: 'circle', value: 'circle' },
  { label: 'rect', value: 'rect' },
  { label: 'roundRect', value: 'roundRect' },
  { label: 'triangle', value: 'triangle' },
  { label: 'diamond', value: 'diamond' },
  { label: 'pin', value: 'pin' },
  { label: 'arrow', value: 'arrow' },
  { label: 'line', value: 'line' },
];

export const nodeAligns = [
  { label: $demoi18n('echart.option.leftAlignmentOfNodes'), value: 'left' },
  { label: $demoi18n('echart.option.rightAlignmentOfNodes'), value: 'right' },
  { label: $demoi18n('echart.option.dualEndedAlignmentOfNodes'), value: 'justify' },
];

export const labelAligns = [
  { label: 'left', value: 'left' },
  { label: 'center', value: 'center' },
  { label: 'right', value: 'right' },
];

export const labelVerticalAligns = [
  { label: 'top', value: 'top' },
  { label: 'middle', value: 'middle' },
  { label: 'bottom', value: 'bottom' },
];

export const stackNames = [
  { label: $demoi18n('option.parallelArrangement'), value: 'parallel' },
  { label: $demoi18n('option.stackArrangement'), value: 'stack' },
  { label: $demoi18n('option.overlapArrangement'), value: 'overlap' },
];

export const pieLabelAlignTos = [
  { label: $demoi18n('echart.option.automatic'), value: 'none' },
  { label: $demoi18n('echart.option.endAlignment'), value: 'labelLine' },
  { label: $demoi18n('echart.option.textAlignment'), value: 'edge' },
];

export const pieSelectModes = [
  { label: $demoi18n('echart.option.shutdown'), value: false },
  { label: $demoi18n('echart.option.single'), value: 'single' },
  { label: $demoi18n('echart.option.multiple'), value: 'multiple' },
];

export const pieSeriesLabelPositions = [
  { label: $demoi18n('echart.option.external'), value: 'outside' },
  { label: $demoi18n('echart.option.inside'), value: 'inside' },
  { label: $demoi18n('echart.option.centerOfCircle'), value: 'center' },
];

export const echartActionTypes = [
  { label: $demoi18n('echart.option.xAxisScaling'), value: 'dataZoomX' },
  { label: $demoi18n('echart.option.legendClick'), value: 'legend' },
];

export const serieLabelForTypes = [
  { label: $demoi18n('echart.option.allThe'), value: 'all' },
  { label: $demoi18n('echart.option.allBars'), value: 'all_bar' },
  { label: $demoi18n('echart.option.allLines'), value: 'all_line' },
  { label: $demoi18n('echart.option.specifyingASeries'), value: 'serie_name' },
];

export const radarTypes = [
  { label: $demoi18n('echart.setting.radarRound'), value: 'circle' },
  { label: $demoi18n('echart.setting.radarPolygon'), value: 'polygon' },
];

export const emptyNames = [
  { label: $demoi18n('option.tomographicDisp'), value: 'tomographic' },
  { label: $demoi18n('option.continuousDisp'), value: 'continuous' },
];

export const labelAline = [
  { label: $demoi18n('panel.radio.horizontalAlign'), value: 'row' },
  { label: $demoi18n('panel.radio.verticalAlign'), value: 'column' },
  { label: $demoi18n('panel.typeSetting.MNpermution'), value: 'rect' },
];

export const labelStyle = [{ label: 'A', value: 'A' }, { label: 'B', value: 'B' }, { label: 'B', value: 'B' }];

export const funnelDisTypes = [
  { label: $demoi18n('echart.setting.funnelTypePyramids'), value: 'ascPyramids' },
  { label: $demoi18n('common.form-item-options.invertedTriangle'), value: 'pyramids' },
  { label: $demoi18n('echart.setting.funnelType'), value: 'funnel' },
];

export const bubblePosition = [
  { label: $demoi18n('panel.label.default'), value: 'default' },
  { label: $demoi18n('panel.option.insideBubble'), value: 'inside' },
  { label: $demoi18n('panel.option.outsideBubble'), value: 'top' },
  { label: $demoi18n('panel.option.notShow'), value: 'none' },
];

export const lineEndStyle = [
  { label: $demoi18n('line.type.straightLine'), value: 'none' },
  { label: $demoi18n('line.type.circle'), value: 'circle' },
  { label: $demoi18n('line.type.square'), value: 'rect' },
  { label: $demoi18n('line.type.arrow'), value: 'arrow' },
];
